package order;

import java.io.*;


public class OrderDataWrite {
    public boolean DataWrite(OrderDataRead ODR){
        OrderDAOArrayList ODAOAL = ODR.getOrders();
        BufferedWriter out;
        try {
            out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("订单数据.txt"),"utf-8"));
            for (Order O:ODAOAL.getOrderArrayList()) {
                out.write(O.toString());
            }
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }

        return true;


    }

}
